from tortoise import Tortoise
import os

# BASE_DIR : str = 'C:\Users\xuhaibo\Desktop\codedemo\AGVSystem\clonemhd'
App_ROOT: str = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir))
PROJECT_ROOT: str = os.path.abspath(os.path.join(App_ROOT, os.pardir)) # 再次获取父路径
BASE_DIR: str = os.path.abspath(os.path.join(PROJECT_ROOT, os.pardir)) # 再次获取父路径

TORTOISE_ORM: dict = {
    "connections": {
        "sqlite": {
            "engine": "tortoise.backends.sqlite",
            "credentials": {"file_path": os.path.join(BASE_DIR, "database", "mhddb.sqlite3")},
        },
    },
    "apps": {
        "models": {
            "models": ["fastapiApp.models"],
            # "models": ["fastapiApp.models", "aerich.models"],
            "default_connection": "sqlite",
        },
    },
    "use_tz": False,  # Whether to use timezone-aware datetimes
    "timezone": "Asia/Shanghai",  # Timezone setting
}

